ci: run the site jobs for the files outside site/ that the build reads - #376
Merged
Conversation
A CHANGELOG.md-only PR (#375) ran four checks instead of seven: the site build and the preview deploy both skipped, because site.yml decides with `grep -qE '^site/'` and the changelog is not under site/. The site renders CHANGELOG.md, so a change that breaks the site build could have merged without CI noticing. #375 was fine only because it was built locally first. Four files outside site/ feed the build: - CHANGELOG.md, imported by pages/changelog.astro with `?raw` - scripts/install.ps1 and scripts/install.sh, served at /install.ps1 and /install.sh by the two route files that read them at build time - apps/netscli-gui/package.json, which site-content/version.ts reads for the version the page displays All three filters now name the same five paths: site.yml's push trigger, the grep in its `changes` job, and site-preview.yml's two. The list is written three times because a workflow `paths:` cannot reference a variable; each copy carries a note pointing at the others. pages.yml only gains a comment. Its push trigger is still deliberately disabled, and the note now says to copy site.yml's list rather than the `['site/**']` it previously suggested, which would have left changes to those four files undeployed. Verified: the regex matches all five inputs and rejects README.md, crates/**, docs/PUBLISHING.md, CHANGELOG.md.bak, package-lock.json, install.ps1.old and notsite/. All three workflows parse, and the parsed `paths:` lists are identical across the three filters.
|
Site preview: https://pr-376.netscli-site-preview.pages.dev Built from ac8526c with Production is unaffected: netscli.com is served from GitHub Pages via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#375 touched only
CHANGELOG.mdand ran four checks instead of seven — the site build and the preview deploy both skipped.site.ymldecides withgrep -qE '^site/', and the changelog isn't undersite/.But the site renders
CHANGELOG.md, so a change that breaks the site build could merge without CI noticing. #375 was fine only because it happened to be built locally first.What the build reads from outside
site/CHANGELOG.mdpages/changelog.astroimports it with?rawscripts/install.ps1/install.ps1bypages/install.ps1.tsscripts/install.sh/install.shbypages/install.sh.tsapps/netscli-gui/package.jsonsite-content/version.tsreads the displayed version from itAll three filters now name the same five paths:
site.yml's push trigger, the grep in itschangesjob, andsite-preview.yml's two. The list is written three times because a workflowpaths:can't reference a variable — each copy carries a note pointing at the others.pages.ymlgains only a comment. Its push trigger is still deliberately disabled; the note now says to copysite.yml's list rather than the['site/**']it previously suggested, which would have left changes to those four files undeployed.Verification
The regex matches all five inputs and rejects
README.md,crates/**,docs/PUBLISHING.md,CHANGELOG.md.bak,package-lock.json,install.ps1.oldandnotsite/.All three workflows parse, and the parsed
paths:lists are identical across the three filters.This PR touches only
.github/workflows/**, so the site jobs will skip on it — which is correct, and is the same filter working as intended.